package File;

import java.io.*;

public class Demo16 {
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("test1.txt");
        try(OutputStream outputStream = new FileOutputStream(file)) {
            byte[] data = new byte[128];
            for (int i = 0; i < 128; i++) {
                data[i] = (byte)((char)i);
            }
            outputStream.write(data);
            outputStream.flush();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
